package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;

public class AttachmentUploadedEvent extends GwtEvent<AttachmentUploadedEventHandler> {

    public static Type<AttachmentUploadedEventHandler> TYPE = new Type<AttachmentUploadedEventHandler>();

    private final String filename;

    public AttachmentUploadedEvent(String filename) {
        this.filename = filename;
    }

    public String getFilename() {
        return filename;
    }

    @Override
    public Type<AttachmentUploadedEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(AttachmentUploadedEventHandler handler) {
        handler.onAttachmentUploaded(this);
    }
}
